package com.ywb.payment.controller;

import com.ywb.payment.service.PaymentService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Author ywb
 */

@RestController
@RequestMapping("/payment")
public class PaymentController {
    @Resource
    private PaymentService paymentService;

    @GetMapping("/hystrix/ok/{id}")
    public String ok(@PathVariable("id") Integer id){
        return paymentService.paymentInfo_ok(id);
    }

    @GetMapping("/hystrix/timeout/{id}")
    public String timeout(@PathVariable("id") Integer id){
        return paymentService.paymentInfo_timeout(id);
    }
}
